<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>aio_error</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_000_001_113">&nbsp;</a>NAME</h4><blockquote>
aio_error - retrieve errors status for an asynchronous I/O operation
(<b>REALTIME</b>)
</blockquote><h4><a name = "tag_000_001_114">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="aio.h.html">aio.h</a>&gt;

int aio_error(const struct aiocb *<i>aiocbp</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_000_001_115">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>aio_error()</i>
function returns the error status associated with the
<b>aiocb</b>
structure referenced by the
<i>aiocbp</i>
argument.
The error status for an asynchronous I/O operation is the errno value
that would be set by the corresponding
<i><a href="read.html">read()</a></i>,
<i><a href="write.html">write()</a></i>,
or
<i><a href="fsync.html">fsync()</a></i>
operation.
If the operation has not yet completed, then the error
status will be equal to EINPROGRESS.
</blockquote><h4><a name = "tag_000_001_116">&nbsp;</a>RETURN VALUE</h4><blockquote>
If the asynchronous I/O operation has completed successfully,
then 0 is returned.
If the asynchronous operation has completed unsuccessfully,
then the error status, as described for
<i><a href="read.html">read()</a></i>,
<i><a href="write.html">write()</a></i>,
and
<i><a href="fsync.html">fsync()</a></i>,
is returned.
If the asynchronous I/O operation has not yet completed, then
EINPROGRESS is returned.
</blockquote><h4><a name = "tag_000_001_117">&nbsp;</a>ERRORS</h4><blockquote>
The 
<i>aio_error()</i>
function will fail if:
<dl compact>

<dt>[ENOSYS]<dd>
The
<i>aio_error()</i>
function is not supported by this implementation.

</dl>
<p>
The
<i>aio_error()</i>
function may fail if:
<dl compact>

<dt>[EINVAL]<dd>
The
<i>aiocbp</i>
argument does not refer to an asynchronous operation whose return
status has not yet been retrieved.

</dl>
</blockquote><h4><a name = "tag_000_001_118">&nbsp;</a>EXAMPLES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_001_119">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_001_120">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_000_001_121">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="aio_read.html">aio_read()</a></i>,
<i><a href="aio_write.html">aio_write()</a></i>,
<i><a href="aio_fsync.html">aio_fsync()</a></i>,
<i><a href="lio_listio.html">lio_listio()</a></i>,
<i><a href="aio_return.html">aio_return()</a></i>,
<i><a href="aio_cancel.html">aio_cancel()</a></i>,
<i><a href="read.html">read()</a></i>,
<i><a href="lseek.html">lseek()</a></i>,
<i><a href="close.html">close()</a></i>,
<i><a href="_exit.html">_exit()</a></i>,
<i><a href="exec.html">exec</a></i>,
<i><a href="fork.html">fork()</a></i>.
</blockquote><h4>DERIVATION</h4><blockquote>
Derived from the POSIX Realtime Extension (1003.1b-1993/1003.1i-1995)
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>

